package com.cy.mall.web.front.goods;

import com.cy.mall.model.Result;
import com.cy.mall.model.domain.goods.GoodsCategory;
import com.cy.mall.service.goods.GoodsCategoryService;
import com.cy.mall.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Description 前台-商品类别管理
 * @Author tanyilin
 * @Date 2019/7/4 15:08
 */
@RestController
@RequestMapping("/goods/category")
@Api(tags = "前台-商品类别管理")
public class GoodsCategoryController extends BaseController {

    @Autowired
    private GoodsCategoryService goodsCategoryService;

    @ApiOperation("全部的已启用的商品类别列表，不分页")
    @GetMapping("/get/all/enable/list")
    public Result<List<GoodsCategory>> getAllEnableGoodsCategoryList() {

        return ok("获取成功", goodsCategoryService.getAllEnableGoodsCategoryList());
    }

}
